﻿<my:FloatingWindow
    xmlns:my="clr-namespace:SilverFlow.Controls;assembly=SilverFlow.Controls"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:SilverlightDebateView"
	xmlns:SilverlightDebateViewModel="clr-namespace:SilverlightDebateViewModel;assembly=SilverlightDebateViewModel"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
	xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
	xmlns:SilverlightDebateViewModel_Classes="clr-namespace:SilverlightDebateViewModel.Classes;assembly=SilverlightDebateViewModel"
	xmlns:SilverlightDebateView_Classes="clr-namespace:SilverlightDebateView.Classes"
	mc:Ignorable="d"
	x:Class="SilverlightDebateView.Statements" BorderBrush="#FFF31919" Width="545" Height="414" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeEnabled="False">
    <my:FloatingWindow.Resources>
        <SilverlightDebateView_Classes:LoginVisibleConverter x:Key="LoginVisibleConverter"/>
        <DataTemplate x:Key="StatementTemplate">
            <StackPanel>
                <TextBlock Text="{Binding CategoryID}"/>
                <TextBlock Text="{Binding CategoryTitle}"/>
                <TextBlock Text="{Binding CreatedBy}"/>
                <CheckBox IsChecked="{Binding Locked, Mode=TwoWay}"/>
                <TextBlock Text="{Binding PostedBy}"/>
                <TextBlock Text="{Binding StatementContent}"/>
                <TextBlock Text="{Binding StatementID}"/>
                <TextBlock Text="{Binding Title}"/>
                <TextBlock Text="{Binding UpdatedBy}"/>
                <TextBlock Text="{Binding UpdatedOn}"/>
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="StatementTemplate1">
            <StackPanel>
                <TextBlock Text="{Binding CategoryTitle}"/>
                <TextBlock Text="{Binding StatementContent}"/>
                <TextBlock Text="{Binding UpdatedOn}"/>
            </StackPanel>
        </DataTemplate>
        <sdk:HierarchicalDataTemplate x:Key="StatementTemplate2" ItemsSource="{Binding Errors}">
            <StackPanel>
                <TextBlock Text="{Binding CategoryTitle}"/>
                <TextBlock Text="{Binding StatementContent}"/>
                <TextBlock Text="{Binding UpdatedOn}"/>
            </StackPanel>
        </sdk:HierarchicalDataTemplate>
        <SolidColorBrush x:Key="InnerShadowDarkBrush" Color="#50505050" />
        <DataTemplate x:Key="StatementTemplate3">
            <StackPanel Orientation="Horizontal" Margin="0,2">
                <TextBlock Text="{Binding Title}" FontSize="16" TextTrimming="WordEllipsis" Width="352" HorizontalAlignment="Left" Margin="0,2"/>
                <StackPanel Height="14" Orientation="Horizontal">
                    <sdk:Label Content="{Binding AgreeCount}" Width="20" HorizontalAlignment="Left" d:LayoutOverrides="Height"/>
                    <SilverlightDebateViewModel_Classes:TwoValuesProgressBar Background="#FFAD2983" Margin="0" Value="{Binding AgreeCount}" Value1="{Binding AgreeCount}" Value2="{Binding DisagreeCount}" Width="113" HorizontalAlignment="Left" d:LayoutOverrides="Height"/>
                    <sdk:Label Content="{Binding DisagreeCount}" Width="20" HorizontalAlignment="Left" d:LayoutOverrides="Height" Margin="4,0,0,0"/>
                </StackPanel>
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="cboCategoriesDataTemplate">
            <StackPanel>
                <sdk:Label Content="{Binding Title}"/>
            </StackPanel>
        </DataTemplate>
        <Style x:Key="StatementsFloatingWindowStyle" TargetType="my:FloatingWindow">
            <Setter Property="Width" Value="300"/>
            <Setter Property="Height" Value="200"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="TabNavigation" Value="Cycle"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="BorderBrush" Value="#FFA2ADB8"/>
            <Setter Property="Background" Value="#FFE7EBED" />
            <Setter Property="TitleBackground">
                <Setter.Value>
                    <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                        <GradientStop Color="#FFFBFBFB" Offset="0"/>
                        <GradientStop Color="#FFE0E4E7" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="my:FloatingWindow">
                        <Grid x:Name="Root" RenderTransformOrigin="0.5,0.5">
                            <Grid.Resources>
                                <Style x:Key="CloseButtonStyle" TargetType="Button">
                                    <Setter Property="Foreground" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderThickness" Value="0.7"/>
                                    <Setter Property="Width" Value="17"/>
                                    <Setter Property="Height" Value="16"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="Button">
                                                <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualState x:Name="Normal"/>
                                                            <VisualState x:Name="MouseOver">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Pressed">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FFD40606" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="Maroon" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FFFFAC85" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Disabled">
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                <GradientStop Offset="0"/>
                                                                <GradientStop Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <Grid>
                                                            <Path x:Name="path" Data="M0,0 L0.9371469,0 L4.000001,3.0628543 L7.0628557,0 L8,0 L8,1.073151 L5.0731506,3.9999998 L8,6.9268494 L8,8 L6.9278555,8 L4.000001,5.0721459 L1.0721471,8 L0,8 L0,7.0948515 L3.0948515,3.9999998 L0,0.90514863 z" 
																Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" StrokeThickness="0" UseLayoutRounding="False" Width="7" Height="7"/>
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                                <Style x:Key="MaximizeButtonStyle" TargetType="Button">
                                    <Setter Property="Foreground" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderThickness" Value="0.7"/>
                                    <Setter Property="Width" Value="17"/>
                                    <Setter Property="Height" Value="16"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="Button">
                                                <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualState x:Name="Normal"/>
                                                            <VisualState x:Name="MouseOver">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Pressed">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF003D80" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF85EBFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF0667D4" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Disabled">
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                <GradientStop Offset="0"/>
                                                                <GradientStop Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <Grid Width="9" Height="8" VerticalAlignment="Center" HorizontalAlignment="Center" UseLayoutRounding="False">
                                                            <Rectangle x:Name="top" HorizontalAlignment="Center" VerticalAlignment="Top" 
																StrokeThickness="0" UseLayoutRounding="False" Width="9" Height="2" Fill="{TemplateBinding Foreground}" />
                                                            <Rectangle x:Name="rect" Stroke="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Top" 
																StrokeThickness="0.7" UseLayoutRounding="False" Width="9" Height="8" />
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                                <Style x:Key="RestoreButtonStyle" TargetType="Button">
                                    <Setter Property="Foreground" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderThickness" Value="0.7"/>
                                    <Setter Property="Width" Value="17"/>
                                    <Setter Property="Height" Value="16"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="Button">
                                                <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualState x:Name="Normal"/>
                                                            <VisualState x:Name="MouseOver">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="topBack" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rectBack" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Pressed">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="topBack" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rectBack" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF003D80" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF85EBFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF0667D4" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Disabled">
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                <GradientStop Offset="0"/>
                                                                <GradientStop Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <Grid Width="9" Height="8" VerticalAlignment="Center" HorizontalAlignment="Center" UseLayoutRounding="False">
                                                            <Canvas>
                                                                <Rectangle x:Name="top"
																	StrokeThickness="0" UseLayoutRounding="False" Width="7" Height="2" Fill="{TemplateBinding Foreground}" Canvas.Top="3" />
                                                                <Rectangle x:Name="rect" Stroke="{TemplateBinding Foreground}" 
																	StrokeThickness="0.7" UseLayoutRounding="False" Width="7" Height="5" Canvas.Top="3" />
                                                                <Path x:Name="rectBack" Data="M0.35,0.345 L6.65,0.35 L6.65,5.65 L4.65,5.65 L4.65,3.65625 L0.35,3.65625 z" Height="6" Canvas.Left="2" 
																	Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeThickness="0.7" UseLayoutRounding="False" Width="7" />
                                                                <Rectangle x:Name="topBack"
																	StrokeThickness="0" UseLayoutRounding="False" Width="7" Height="2" Fill="{TemplateBinding Foreground}" Canvas.Left="2" />
                                                            </Canvas>
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                                <Style x:Key="MinimizeButtonStyle" TargetType="Button">
                                    <Setter Property="Foreground" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
                                    <Setter Property="BorderThickness" Value="0.7"/>
                                    <Setter Property="Width" Value="17"/>
                                    <Setter Property="Height" Value="16"/>
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="Button">
                                                <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualState x:Name="Normal"/>
                                                            <VisualState x:Name="MouseOver">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Pressed">
                                                                <Storyboard>
                                                                    <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF003D80" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF85EBFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                    <ColorAnimation Duration="0" To="#FF0667D4" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Disabled">
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
                                                        <Border.Background>
                                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                                <GradientStop Offset="0"/>
                                                                <GradientStop Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Border.Background>
                                                        <Grid Width="9" Height="8" UseLayoutRounding="False">
                                                            <Rectangle x:Name="top" HorizontalAlignment="Center" VerticalAlignment="Bottom" 
																StrokeThickness="0" UseLayoutRounding="False" Width="9" Height="2" Fill="{TemplateBinding Foreground}" />
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </Grid.Resources>
                            <Grid.RenderTransform>
                                <CompositeTransform/>
                            </Grid.RenderTransform>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="WindowStates">
                                    <VisualState x:Name="Open">
                                        <Storyboard>
                                            <PointAnimation Duration="0" To="0,0" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="ContentRoot" d:IsOptimized="True"/>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentRoot">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleX">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleY">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Closed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Minimized">
                                        <Storyboard>
                                            <PointAnimation Duration="0" To="0,1" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="ContentRoot" d:IsOptimized="True"/>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleX">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:0.2" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleY">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:0.2" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:0.2" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:0.2">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Restored">
                                        <Storyboard>
                                            <PointAnimation Duration="0" To="0,1" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="ContentRoot" d:IsOptimized="True"/>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentRoot">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleX">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleY">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                <SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <VisualStateManager.CustomVisualStateManager>
                                <ei:ExtendedVisualStateManager/>
                            </VisualStateManager.CustomVisualStateManager>
                            <Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" 
								RenderTransformOrigin="0,0" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
                                <Grid.Effect>
                                    <DropShadowEffect ShadowDepth="0.5" Opacity="0.3" BlurRadius="12" />
                                </Grid.Effect>
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <Border x:Name="ContentBorder" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <Border x:Name="Chrome" Width="Auto" Background="{TemplateBinding TitleBackground}" UseLayoutRounding="False" CornerRadius="3,3,0,0">
                                            <Grid Height="Auto" Width="Auto" UseLayoutRounding="False">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition/>
                                                    <ColumnDefinition Width="Auto"/>
                                                    <ColumnDefinition Width="Auto"/>
                                                    <ColumnDefinition Width="6"/>
                                                </Grid.ColumnDefinitions>
                                                <ContentControl Content="{TemplateBinding Title}" 
													IsTabStop="False" 
													HorizontalAlignment="Stretch"
													VerticalAlignment="Center"
													Margin="6,3,6,3" UseLayoutRounding="False" />
                                                <StackPanel x:Name="MenuPanel" Orientation="Horizontal"  Grid.Column="1">
                                                    <Button x:Name="MinimizeButton" IsTabStop="False" VerticalAlignment="Center" UseLayoutRounding="False"
														Style="{StaticResource MinimizeButtonStyle}" Margin="0,2,1,2">
                                                        <ToolTipService.ToolTip>
                                                            <ToolTip Content="Minimize" />
                                                        </ToolTipService.ToolTip>
                                                    </Button>
                                                    <Button x:Name="RestoreButton" IsTabStop="False" VerticalAlignment="Center" UseLayoutRounding="False"
														Style="{StaticResource RestoreButtonStyle}" Visibility="Collapsed" Margin="0,2,1,2">
                                                        <ToolTipService.ToolTip>
                                                            <ToolTip Content="Restore" />
                                                        </ToolTipService.ToolTip>
                                                    </Button>
                                                    <Button x:Name="MaximizeButton" IsTabStop="False" VerticalAlignment="Center" UseLayoutRounding="False"
														Style="{StaticResource MaximizeButtonStyle}" Margin="0,2,1,2">
                                                        <ToolTipService.ToolTip>
                                                            <ToolTip Content="Maximize" />
                                                        </ToolTipService.ToolTip>
                                                    </Button>
                                                </StackPanel>
                                            </Grid>
                                        </Border>
                                        <Border Grid.Row="1">
                                            <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}"
												ContentTemplate="{TemplateBinding ContentTemplate}"
												HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
												VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                        </Border>
                                    </Grid>
                                </Border>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <SolidColorBrush x:Key="ControlOuterHighlightBrush" Color="#40FFFFFF" />
        <SolidColorBrush x:Key="InnerShadowLightBrush" Color="#20202020" />
        <ControlTemplate x:Key="ProgressBarTemplate" TargetType="ProgressBar">
            <Grid x:Name="Root">
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                        <VisualState x:Name="Determinate" />
                        <VisualState x:Name="Indeterminate">
                            <Storyboard RepeatBehavior="Forever">
                                <DoubleAnimation Duration="00:00:.5" From="0" To="20" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X" Storyboard.TargetName="IndeterminateGradientFill" />
                                <ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="IndeterminateRoot">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible" />
                                </ObjectAnimationUsingKeyFrames>
                                <ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="DeterminateRoot">
                                    <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Collapsed" />
                                </ObjectAnimationUsingKeyFrames>
                                <ColorAnimation Duration="0" To="#66FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <ColorAnimation Duration="0" To="#66FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <ColorAnimation Duration="0" To="#66FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <ColorAnimation Duration="0" To="Transparent" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Offset)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <DoubleAnimation Duration="0" To="0.85" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <DoubleAnimation Duration="0" To="0.85" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[4].(GradientStop.Offset)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <ColorAnimation Duration="0" To="#66FEFEFE" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[4].(GradientStop.Color)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <ColorAnimation Duration="0" To="Transparent" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[5].(GradientStop.Color)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <DoubleAnimation Duration="0" To="0.15" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[5].(GradientStop.Offset)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="IndeterminateGradientFill" d:IsOptimized="True" />
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>
                <Border x:Name="OuterHighlight" BorderBrush="{StaticResource ControlOuterHighlightBrush}" BorderThickness="1" CornerRadius="3" Margin="0,0,-1,-1" />
                <Border x:Name="ProgressBarTrack" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" />

                <!-- Inner Shadow. -->
                <Border BorderBrush="{StaticResource InnerShadowDarkBrush}" BorderThickness="1" CornerRadius="2" />
                <Border BorderBrush="{StaticResource InnerShadowLightBrush}" BorderThickness="1" CornerRadius="1" Margin="1" />
                <Grid x:Name="ProgressBarRootGrid">
                    <Grid x:Name="IndeterminateRoot" Margin="1" Visibility="Collapsed">
                        <Rectangle x:Name="IndeterminateSolidFill" Fill="{TemplateBinding Foreground}" Margin="{TemplateBinding BorderThickness}" Opacity="1" RadiusX="1" RadiusY="1" RenderTransformOrigin="0.5,0.5" />
                        <Grid>
                            <Rectangle x:Name="IndeterminateGradientFill" Margin="{TemplateBinding BorderThickness}" Opacity="0.7" RadiusX="1" RadiusY="1" StrokeThickness="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0,1" MappingMode="Absolute" SpreadMethod="Repeat" StartPoint="20,1">
                                        <LinearGradientBrush.Transform>
                                            <TransformGroup>
                                                <TranslateTransform X="0" />
                                                <SkewTransform AngleX="-45" />
                                            </TransformGroup>
                                        </LinearGradientBrush.Transform>
                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
                                        <GradientStop Color="#00FFFFFF" Offset=".25" />
                                        <GradientStop Color="#FFFFFFFF" Offset="0.85" />
                                        <GradientStop Color="#25FFFFFF" Offset="0.339" />
                                        <GradientStop Color="#33FEFEFE" Offset="0.253" />
                                        <GradientStop Color="#11FFFFFF" Offset="0.545" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="IndeterminateOverlay" Margin="{TemplateBinding BorderThickness}" RadiusX="1" RadiusY="1" Visibility="Collapsed">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#2BFFFFFF" Offset="0" />
                                        <GradientStop Color="#2B000000" Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="IndeterminateHighlight" Margin="{TemplateBinding BorderThickness}" RadiusX="1" RadiusY="1">
                                <Rectangle.Effect>
                                    <BlurEffect Radius="2" />
                                </Rectangle.Effect>
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#26FFFFFF" Offset="0" />
                                        <GradientStop Color="Transparent" Offset="1" />
                                        <GradientStop Color="#26FFFFFF" Offset="0.5" />
                                        <GradientStop Color="Transparent" Offset="0.5" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                        </Grid>
                    </Grid>
                    <Grid x:Name="DeterminateRoot" Margin="1">
                        <Grid x:Name="ProgressBarIndicator" HorizontalAlignment="Left">
                            <Rectangle Fill="{TemplateBinding Foreground}" Margin="{TemplateBinding BorderThickness}" RadiusX="1" RadiusY="1" />
                            <Rectangle x:Name="Overlay" Margin="{TemplateBinding BorderThickness}" RadiusX="1" RadiusY="1" Visibility="Collapsed">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#2BFFFFFF" Offset="0" />
                                        <GradientStop Color="#2B000000" Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="Highlight" Margin="{TemplateBinding BorderThickness}" RadiusX="1" RadiusY="1">
                                <Rectangle.Effect>
                                    <BlurEffect Radius="2" />
                                </Rectangle.Effect>
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#26FFFFFF" Offset="0" />
                                        <GradientStop Color="Transparent" Offset="1" />
                                        <GradientStop Color="#26FFFFFF" Offset="0.5" />
                                        <GradientStop Color="Transparent" Offset="0.5" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                        </Grid>
                    </Grid>
                </Grid>
            </Grid>
        </ControlTemplate>
    </my:FloatingWindow.Resources>
    <my:FloatingWindow.Style>
        <StaticResource ResourceKey="StatementsFloatingWindowStyle"/>
    </my:FloatingWindow.Style>

    <my:FloatingWindow.DataContext>
        <SilverlightDebateViewModel:StatementsViewModel/>
    </my:FloatingWindow.DataContext>

    <Canvas x:Name="LayoutRoot">
        <i:Interaction.Triggers>
            <i:EventTrigger SourceName="LayoutRoot">
                <i:InvokeCommandAction x:Name="LoadCategories" Command="{Binding LoadCategoriesCommand}"/>
            </i:EventTrigger>
            <ei:DataTrigger Binding="{Binding AutoLoadStatements}" Value="True">
                <i:InvokeCommandAction x:Name="AutoLoadStatements" Command="{Binding LoadStatementsCommand}"/>
            </ei:DataTrigger>
        </i:Interaction.Triggers>
        <Canvas.Style>
            <Style TargetType="Canvas"/>
        </Canvas.Style>
        <StackPanel Canvas.Top="15" Orientation="Horizontal" Canvas.Left="8" Width="527">
            <sdk:Label FontSize="13.333" Content="Category:" VerticalAlignment="Center"/>
            <ComboBox x:Name="comboBox" ItemsSource="{Binding CategoryList}" ItemTemplate="{StaticResource cboCategoriesDataTemplate}" SelectedValue="{Binding SelectedCategory, Mode=TwoWay}" Margin="5,0,0,0" Width="154"/>
            <TextBox x:Name="textBox" TextWrapping="Wrap" Text="{Binding SearchString, Mode=TwoWay}" Margin="5,0,0,0" Width="149"/>
            <Button Content="Search" Command="{Binding LoadStatementsCommand}" Margin="5,0,0,0"/>
            <Button Content="New Statement" Visibility="{Binding VMMainPageViewModel.RIAAuthenticationHeaderProperty, Converter={StaticResource LoginVisibleConverter}}" Margin="5,0,0,0">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <i:InvokeCommandAction Command="{Binding VMMainPageViewModel.FlipSwitchShowNewStatementCommand}"/>
                        <i:InvokeCommandAction Command="{Binding VMMainPageViewModel.SetSelectedCategoryCommand}" CommandParameter="{Binding SelectedCategory}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Button>
        </StackPanel>
        <StackPanel Height="24" Canvas.Top="47" Canvas.Left="357" Orientation="Horizontal">
            <sdk:Label Content="Agree" FontSize="13.333"/>
            <sdk:Label Content="Disagree" Margin="75,0,0,0" FontSize="13.333" HorizontalAlignment="Left" VerticalAlignment="Top"/>
        </StackPanel>

        <Grid Width="535" Height="310" Margin="0" Canvas.Top="68">
            <Grid.RowDefinitions>
                <RowDefinition Height="0.89*"/>
                <RowDefinition Height="0.11*"/>
            </Grid.RowDefinitions>
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="SelectionChanged" SourceObject="{Binding ElementName=listBox1}">
                    <i:InvokeCommandAction Command="{Binding VMMainPageViewModel.VMStatementViewModel.SelectedStatement}" CommandParameter="{Binding SelectedItem, ElementName=listBox1}"/>
                    <i:InvokeCommandAction Command="{Binding VMMainPageViewModel.VMStatementViewModel.LoadSelectedStatementCommand}" CommandParameter="{Binding SelectedItem, ElementName=listBox1}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <ListBox x:Name="listBox1" Margin="6,8,0,0" ItemTemplate="{StaticResource StatementTemplate3}" ItemsSource="{Binding StatementList}" SelectedValuePath="StatementID" d:LayoutOverrides="GridBox" Padding="0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="529" Height="258" BorderThickness="1">
                <ListBox.ItemContainerStyle>
                    <Style TargetType="ListBoxItem">
                        <Setter Property="Padding" Value="0"/>
                        <Setter Property="Margin" Value="0"/>
                    </Style>
                </ListBox.ItemContainerStyle>
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonUp">
                        <i:InvokeCommandAction Command="{Binding GetSelectedStatementCommand}" CommandParameter="{Binding SelectedItem, ElementName=listBox1}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </ListBox>
            <sdk:DataPager x:Name="dataPager" HorizontalAlignment="Left" Source="{Binding StatementPagedCollection}" Margin="10,0,0,0" Grid.Row="1" VerticalAlignment="Center" PageSize="8">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="PageIndexChanged">
                        <i:InvokeCommandAction Command="{Binding SetRecordsByPagerCommand}" CommandParameter="{Binding PageIndex, ElementName=dataPager, Mode=TwoWay}"/>
                    </i:EventTrigger>
                    <ei:PropertyChangedTrigger Binding="{Binding PageSize, ElementName=dataPager}">
                        <i:InvokeCommandAction Command="{Binding SetStatementPerPageCommand}" CommandParameter="{Binding PageSize, ElementName=dataPager}"/>
                    </ei:PropertyChangedTrigger>
                    <i:EventTrigger>
                        <i:InvokeCommandAction Command="{Binding SetStatementPerPageCommand}" CommandParameter="{Binding PageSize, ElementName=dataPager}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </sdk:DataPager>
        </Grid>
        <ProgressBar Height="10" Template="{StaticResource ProgressBarTemplate}" Width="100" IsIndeterminate="{Binding Searching, Mode=OneWay}" Canvas.Left="423" Canvas.Top="358"/>
    </Canvas>
</my:FloatingWindow>
